import { connect } from "react-redux"
import Count from "../Count"
import { incA, decA, asyncMul } from "../redux/actions"

// function mapStateToProps(state) {
//   return {
//     count: state.count,
//     msg: state.msg,
//     color: state.color,
//   }
// }

// function mapDispatchToProps(dispatch) {
//   return {
//     inc: function (num) {
//       dispatch(incA(num))
//     },
//     dec: function (num) {
//       dispatch(decA(num))
//     },
//   }
// }

export default connect(
  (state) => ({
    count: state.count,
    msg: state.msg,
    color: state.color,
  }),
  { incA, decA, asyncMul }
)(Count)
